<?php
namespace app\hotel\model;

use think\Model;
use think\Db;
use think\Session;

class Hotel extends Model
{

    static function getHotelById($id,$field = array(),$where = array()){

        return Db::name('hotel')->field($field)->where('hotel_id',$id)->where($where)->find();

    }

    static function editHotelInfo($data){

        $id = Session::get('hotel_id');

        return Db::name('hotel')->where('hotel_id',$id)->update($data);

    }
}